<!DOCTYPE html>
<html lang="en-us">
<head>
	<meta charset="utf-8">
	<title> 测试驱动平台  </title>
	
	<link rel="stylesheet" type="text/css" media="screen" href="css/common.css">
	<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min-3.2.0.css">
	<link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.modify.css">
	<link rel="stylesheet" type="text/css" media="screen" href="css/expand.css">
			<link rel="stylesheet" type="text/css" media="screen" href="css/daterangepicker-bs3.css">
	<link rel="stylesheet" type="text/css" media="screen" href="css/font-awesome.min.css">
		<link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-production.css">		
		<link rel="stylesheet" href="css/bootstrap-select.css">
	<link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-skins.css">
		<link rel="stylesheet" type="text/css" media="screen" href="css/demo-increase.css">	  
		<link rel="stylesheet" type="text/css" href="css/dataTables.bootstrap.css" /> 
    <link rel="stylesheet" type="text/css" href="css/manhuaTip.1.0.css">   	
  <style type="text/css">
/* 	   	body {
	      padding-top: 70px;
	    } */
	    .bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
		    width: 180px !important;
		}
	    .bootstrap-select > .btn{
	    	height: 30px;
	    }
	    #dt_basic > tbody > tr:not([class*="tr-expandable"]) > td {
	    	text-align: center;
	    }
	    .param_table > tbody > tr > td > input{
	    	
	    }
	    /* ul.dropdown-menu > .selected::before {
    	display: none
    	}
    	ul.dropdown-menu > .selected::after {
    	display: none
    	} */
    	#tbody > tr.odd > td:nth-child(3) {
    		word-break: break-all;
    	}
    	a.assert-details, input.assert-details{
		    max-width: 220px;
		    overflow: hidden;
		    text-overflow: ellipsis;
		    white-space: nowrap;
		}
		#showinfo1{
			  display:none;
			  left:1px;
			  top:1px;
			  padding:5px;
			  position:fixed; 
			  z-index:999999; 
			  max-width:600px;
			  word-break:break-all;
			  border: 1px solid #5e4e3f;
			  background: white;
 		}
 		div.dataTables_filter {
		    position: static !important;
		}
		.form-control[disabled]{
		    background-color: #eee !important;
		}
   	</style>

</head>
<body id="autog7" class="desktop-detected" style="min-height: 701px; height: auto;">

<section id="widget-grid" class="">
	<!-- row -->
	<div class="row" id="allTaskBox">
		<!-- NEW WIDGET START -->
			<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
				<!-- Widget ID (each widget will need unique ID)-->
				<div class="jarviswidget jarviswidget-color-blueLight" id="wid-id-0" data-widget-sortable="true" data-widget-colorbutton="false" data-widget-editbutton="false" data-widget-togglebutton="false" data-widget-deletebutton="false" style="min-height:500px">
					<!-- widget div-->
					<header role="heading" style="line-height: 18px;"><div role="menu" class="jarviswidget-ctrls">    <a data-original-title="全屏" href="javascript:void(0);" class="button-icon jarviswidget-fullscreen-btn" rel="tooltip" title="" data-placement="left"><i class="fa fa-resize-full "></i></a> </div>
					<span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2 langlanguage="vehicleBasicInfo">测试驱动平台</h2>
					<span class="jarviswidget-loader"><i class="fa fa-refresh fa-spin"></i></span>
					</header>
					<div role="content">
						<!-- widget edit box -->
						<div class="jarviswidget-editbox">
							<!-- This area used as dropdown edit box -->
						</div>
						<!-- end widget edit box -->
						<!-- widget content -->
						<div class="widget-body no-padding">
							<!-- 自定义搜索区 -->
							<div class="widget-body-toolbar" >
								<div role="form" class="smart-form">
									<div class="pull-left global-search-box2">									
										<section class="pull-left no-padding col pull-width160 onlyusefor">
											<label>所在分组</label>
											<label class="select">
												<select class="input-sm" name="docker_group" id="docker_group" onchange="getService(this);"></select> <i></i>
											</label>
										</section>
										<section class="pull-left no-padding col pull-width180">
											<label>service</label>
									        <div class="select form-group">
									          <select name="docker_service" id="docker_service" class="selectpicker" multiple data-live-search="true" data-live-search-placeholder="Search" data-actions-box="true">
									          </select>
									        </div>
										</section>
										<!-- <section class="pull-left no-padding col pull-width180">
											<label>标签(release)</label>
									        <div class="select form-group">
									          <select class="selectpicker" id="docker_release" name="docker_release" multiple data-live-search="true" data-live-search-placeholder="Search" data-actions-box="true">
									              <option value=1>smart</option>
									              <option value=7>coldchain</option>
									              <option value=4>gpsevent</option>
									              <option value=10>currents</option>
									              <option value=13>gnns</option>
									              <option value=16>ems</option>
									              <option value=19>trace</option>
									              <option value=22>mileage</option>
									          </select>
									        </div>
										</section> -->
										
										<section class="pull-left no-padding col pull-width180">
											<label>测试环境</label>
											<div class="select form-group">
											  <select name="test_env" id="test_env" class="selectpicker" multiple data-actions-box="true" data-done-button="true">
											    <option value=1>test</option>
											    <option value=2>线上</option>
											  </select>
											</div>
										</section>
										<section class="pull-left no-padding col pull-width240">
											<label class="" langlanguage="duration_report">服务更新时间</label>
											<label class="input">
											<i class="icon-prepend fa fa-calendar"></i>
											<input id="reservationT" class="input-sm" type="text" maxlength="10" name="in_date">
											</label>
										</section>
										<section class="pull-left no-padding col pull-width180">
											<label>发布状态</label>
											<div class="select form-group">
											  <select name="issuedPermission" id="issuedPermission" class="selectpicker" multiple data-actions-box="true" data-done-button="true">
											    <option value=1>已同意</option>
											    <option value=2>已拒绝</option>
											    <option value=3>待处理</option>
											  </select>
											</div>
										</section>
										<section class="pull-left no-padding col ">
											<label></label>
											<label class="select">
											<a id="s_btn1" class="btn btn-primary btn-sm" type="button" langlanguage="query" onclick="searchSubmit();">查询</a>
											</label>
										</section>
										<!-- <section class="pull-left no-padding col pull-width200" >
											<label id="importCase">请选择导入文件(<a href="profiles/mqexample.xlsx">模板</a>)</label>
											<form id="importExceldata" name="importExceldata" method="POST"
												enctype="multipart/form-data" action="/smarttest-frontstage/autog7/importCase.action">
												<div class="pull-left global-search-box">
													<input type="file" id="importCaseFile"  accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel" name="files" value=""
														size="20" multiple="multiple"/>									
												</div>	
												<button class="btn btn-primary btn-sm" type="submit">提交</button>
												<input id="upload" class="btn btn-primary btn-sm" type="button" value="上传">								
											</form>		
										</section>	 -->			
								</div>
							</div>
							<div class="row no-margin margin-top-10 margin-bottom-10"> </div>
							<div id="scroll_div" class="table table-hover table-expandable" style="">
								<table id="dt_basic" class="table table-striped table-bordered table-hover has-tickbox dataTable" style="border: 1px solid #ddd !important;table-layout:fixed;width:100%;word-break:break-all; word-wrap:break-all;">
									<thead>
									<tr>
									<th style="width: 10%;text-align: center;">分组</th>
									<th style="width: 15%;text-align: center;">service</th>
									<th style="width: 15%;text-align: center;">标签(release)</th>
									<th style="width: 10%;text-align: center;">测试环境</th>
									<th style="width: 10%;text-align: center;">自动化</th>
									<th style="width: 10%;text-align: center;">手工</th>
									<th style="width: 15%;text-align: center;">服务更新时间</th>
									<th style="width: 15%;text-align: center;">发布许可</th>
									</tr>
									</thead>
									<tbody id="tbody" level=""> 
									<!-- <tr sumid="7" class="test_summary"><td><input type="checkbox" class="checksum"></td>
									<td>
										<div class="btn-group">
										<button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown">
											<i class="fa fa-pencil"></i>
											<i class="fa fa-caret-down"></i>
										</button>
										<ul class="dropdown-menu">
											<li>
												<a onclick=""  href="javascript:void(0);">编辑</a>
											</li>
											<li class="divider"></li>
											<li>
												<a onclick=""  href="javascript:void(0);">删除</a>
											</li>
										</ul>
										</div>
									</td>
									<td>huoyunren.currents.simpleByGpsnos</td>
									<td>1</td>
									<td>smart</td>
									<td>duanxiangyun</td>
									<td>DSP_线上环境</td>
									<td>POST</td>
									<td></td>
									<td><font color="red"></font></td>
									<td><div></div><a class="table-expandable-arrow btn btn-sm" style="margin:0 auto;margin-top: 5px;" onclick="launchInterDetails(this);"></a></td>
									<td><a class="btn btn-primary btn-sm" langlanguage="query" type="button" onclick="runCurrentSumTest(this);">运行</a></td>
									</tr>		 	 -->						
									</tbody>
								</table>
								
							</div>
<!-- 							<div class="dt-row dt-bottom-row"><div class="row"><div class="col-sm-1"><div class="dataTables_length" id="dt_basic_length"><span class="smart-form"><label class="select" style="width: 60px;"><select aria-controls="dt_basic" size="1" name="dt_basic_length"><option selected="selected" value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select><i></i></label></span></div></div><div class="col-sm-5"><div id="dt_basic_info" class="dataTables_info">从 1 到 10 /共 23 条数据</div></div><div class="col-sm-6 text-right"><div class="dataTables_paginate paging_bootstrap_full"><ul class="pagination"><li class="first disabled"><a href="#">首页</a></li><li class="prev disabled"><a href="#">前一页</a></li><li class="active"><a href="#">1</a></li><li><a href="#">2</a></li><li><a href="#">3</a></li><li class="next"><a href="#">后一页</a></li><li class="last"><a href="#">尾页</a></li></ul></div></div></div></div>							
 -->							
 							</div>
						
						</div>
						
						<!-- end widget content -->
					</div>
					<!-- end widget div -->
				</div>
				<!-- end widget -->
			</article>
		<!-- WIDGET END -->

	</div>
	<div class="modal fade" id="manualReportModal" tabindex="-1" role="dialog" aria-labelledby="manualReportLabel" aria-hidden="true">
	    <div class="modal-dialog">
	        <div class="modal-content">
	            <div class="modal-header">
	                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
	                    ×
	                </button>
	                <h4 class="modal-title" id="manualReportLabel" >手工测试报告</h4>
	            </div>
            	<div class="modal-body" id="manualReportdetail">
						<div role="form" class="smart-form">
							<div class="pull-left global-search-box2">
								<section class="pull-left no-padding col pull-width100">
									<label>测试结果</label>
									<label class="select">
										<select id="manualTestResult" class="input-sm form-control"><option value="0" selected="selected">PASS</option><option value="1">FAIL</option><option value="2">SKIP</option></select> <i></i>
									</label>
								</section>	
							
								<section class="pull-left no-padding col pull-width300" id="BugUrl_section">
									<label>BUG地址</label>
									<label class="input form-group has-feedback has-error" >
										<input id="BugUrl" class="form-control" type="text" name="BugUrl" style="height: 30px !important;">
									</label>
								</section>	
								<section class="pull-left no-padding col" id="manualCase_section">
									<label id="manual_case">请选择测试用例</label>
									<form id="importManualCase" name="importManualCase" method="POST"
										enctype="multipart/form-data">
										<div class="pull-left global-search-box form-control">
											<input type="file" id="importManualCaseFile"  accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,text/csv" name="fileUpload" value=""
												size="20" onclick="$('#importManualCaseFile').val('');" onchange="mqUploadFile();"/>									
										</div>									
									</form>		
								</section>
							</div>
						</div>
						<div style="clear:both;"></div>	
				</div>
			    
                <div class="modal-footer" id="submitdiv">
					<button id="submitManualReport" type="submit" class="btn btn-primary btn-sm" onclick="submitManualReport();">确定</button>
                    <button type="submit" class="btn btn-sm btn-warning" data-dismiss="modal" >取消</button>
                </div>	            
	        </div>
	    </div>
	</div>
</section>
<!-- end widget grid -->
<!--================================================== -->

	<!-- PACE LOADER - turn this on if you want ajax loading to show (caution: uses lots of memory on iDevices)
	<script data-pace-options='{ "restartOnRequestAfter": true }' src="js/plugin/pace/pace.min.js"></script>-->

	<!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->
	<script src="js/libs/jquery-2.0.2.min.js"></script>
	<script>
		if (!window.jQuery) {
			document.write('<script src="js/libs/jquery-2.0.2.min.js"><\/script>');
		}
	</script>

	<script src="js/libs/jquery-ui-1.10.3.min.js"></script>
	<script>
		if (!window.jQuery.ui) {
			document.write('<script src="js/libs/jquery-ui-1.10.3.min.js"><\/script>');
		}
	</script>
	<!-- BOOTSTRAP JS -->
	<script src="js/bootstrap/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/bootstrapValidator.min.js"></script>
	<script src="js/common.js"></script>
	<script src="js/bootstrap/bootstrap-select.js"></script>
	<script src="js/plugin/date/moment.js"></script>
	<script src="js/plugin/date/daterangepicker.js"></script>
	<script src="js/bootstrap/bootstrap-select.js"></script>
	<script type="text/javascript" src="js/plugin/iresizer/iframeResizer.contentWindow.min.js"></script> 
	<script src="js/bootstrap/bootstrap-table-expandable.js"></script>
  <script src="js/jquery.dataTables.min.js"></script> 
  <script type="text/javascript" language="javascript" src="js/dataTables.bootstrap.js"></script> 
  <script src="js/timeformat.js"></script>
  <script src="js/jquery.cookie.js"></script>
   <script src="js/testAuto.js"></script>
	<script>
	
	$(function() {
		//处理日期
		var begintime = moment().subtract('days',30).format('YY-MM-DD 00:00');
		var endtime = moment().format('YY-MM-DD HH:mm');
		$('#reservationT').val(begintime+' - '+endtime);
		$('#reservationT').daterangepicker(  
                {  
                    // startDate: moment().startOf('day'),  
                    //endDate: moment(),  
                    minDate: '17-01-01 00:00',    //最小时间  
                    maxDate : moment(), //最大时间   
                    dateLimit : {  
                        years : 1  
                    }, //起止时间的最大间隔  
                    showDropdowns : true,  
                    showWeekNumbers : false, //是否显示第几周  
                    timePicker : true, //是否显示小时和分钟  
                    timePickerIncrement : 1, //时间的增量，单位为分钟  
                    timePicker12Hour : false, //是否使用12小时制来显示时间  
                    ranges : {  
                        //'最近1小时': [moment().subtract('hours',1), moment()],  
                        '今日': [moment().startOf('day'), moment()],  
                        '昨日': [moment().subtract('days', 1).startOf('day'), moment().subtract('days', 1).endOf('day')],  
                        '最近7日': [moment().subtract('days', 6), moment()],  
                        '最近30日': [moment().subtract('days', 29), moment()],
                    },  
                    opens : 'right', //日期选择框的弹出位置  
                    buttonClasses : [ 'btn btn-default' ],  
                    applyClass : 'btn-small btn-primary blue',  
                    cancelClass : 'btn-small',  
                    format : 'YY-MM-DD HH:mm', //控件中from和to 显示的日期格式  
                    separator : ' - ',  
                    locale : {  
                        applyLabel : '确定',  
                        cancelLabel : '取消',  
                        fromLabel : '起始时间',  
                        toLabel : '结束时间',  
                        customRangeLabel : '自定义',  
                        daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],  
                        monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',  
                                '七月', '八月', '九月', '十月', '十一月', '十二月' ],  
                        firstDay : 1  
                    }  
                }, function(start, end, label) {//格式化日期显示框  
                      
                    $('#reservationT').html(start.format('YY-MM-DD HH:mm') + ' - ' + end.format('YY-MM-DD HH:mm'));
               }); 
		getAllGroups(function () {
			getService($("#docker_group").get(0));
  		});
		convertDataTable();
		$('#manualReportModal').on('show.bs.modal', function (event) {
			 var btnThis = $(event.relatedTarget); //触发事件的按钮  
		      //var modal = $(this);  //当前模态框  
		      selectBuildPlatId = btnThis.closest('tr').attr("id"); 
		      getManualReport(parseInt(selectBuildPlatId.replaceAll("buildPlatform_","")));
		      //modal.find('.content').val(content); 
		});
	});
	</script>

  
</body>

</html>
